import request from '@/utils/request'
import {encodeParams} from '@/utils'

// 列表
export function getList(data) {
  return request({
    url: `/api/user/tenantry?${encodeParams(data)}`,
    method: 'GET',
  })
}
//收益
export function getGain(data) {
  return request({
    url: `/api/user/tenantry/gain?${encodeParams(data)}`,
    method: 'GET',
  })
}


//补录
export function addGain(data) {
  return request({
    url: `/api/user/tenantry/gain`,
    method: 'POST',
    data
  })
}
//添加
export function create(data) {
  return request({
    url: '/api/user/tenantry',
    method: 'POST',
    data
  })
}


//根据id查询
export function getById(id) {
  return request({
    url: `/api/user/tenantry/${id}`,
    method: 'GET',
  })
}

//更新user/tenantry
export function update(id,data) {
  return request({
    url: `/api/user/tenantry/${id}`,
    method: 'PUT',
    data
  })
}

//更新user/tenantry
export function deleteIt(id) {
  return request({
    url: `/api/user/tenantry/${id}`,
    method: 'DELETE',
  })
}

